package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.util.HashMap;

@Data
public class Department {
    private Long id;

    private String name;

    private String sn;

    //把部门转为json字符串,回显模态框里面的额编辑

    public String getJson(){
        HashMap hashMap = new HashMap();
        hashMap.put("id",id);
        hashMap.put("name",name);
        hashMap.put("sn",sn);
        //不能直接传this进去,会出现死循环,所以要用map,
        return JSON.toJSONString(hashMap);
    }


}